import * as ajax from "../../common/ajax";

export const get = id => ajax.get("/leader/activity/" + id);

export const create = entity => ajax.post("/leader/activity", entity);

export const deleteItem = id => ajax.pureDelete("/leader/activity/" + id);

export const update = entity => ajax.put("/leader/activity", entity);

export const getPageCount = (areaName, name) =>
  ajax.get("/leader/activity/page/count", {
    areaName: areaName,
    name: name
  });

export const getPage = (index, areaName, name) =>
  ajax.get("/leader/activity/page/" + index, {
    areaName: areaName,
    name: name
  });

export const listName = () => ajax.pureGet("/leader/activity/names");

export const pageSize = 20;
